package com.hand.wyc24548;

import io.choerodon.swagger.annotation.Permission;
import io.swagger.annotations.ApiOperation;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

import io.choerodon.resource.annoation.EnableChoerodonResourceServer;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableDiscoveryClient
@EnableChoerodonResourceServer  // 开启资源认证、关闭 Security 安全认证
@SpringBootApplication
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    @GetMapping
    @Permission
    @ApiOperation(value = "demo")
    public ResponseEntity<String> hello(){
        return new ResponseEntity<>("hello hzero!", HttpStatus.OK);
    }

}
